package cn.iocoder.yudao.module.resource.api;

import cn.iocoder.yudao.module.resource.api.enums.UserTimeTransactionTypeEnum;
import cn.iocoder.yudao.module.resource.service.usertimemanager.IUserTimeManagerService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class UserTimeManagerApiImpl implements IUserTimeManagerApi {
    @Resource
    private IUserTimeManagerService userTimeManagerService;

    @Override
    public void purchaseTime(Long userId, UserTimeTransactionTypeEnum transactionType, Long orderId, Long timeMs) {
        userTimeManagerService.purchaseTime(userId, transactionType, orderId, timeMs);
    }

    @Override
    public boolean consumeTime(Long userId, String gameMatchId, Integer roleId, String roleName, Long timeMs) {
        return userTimeManagerService.consumeTime(userId, gameMatchId, roleId, roleName, timeMs);
    }

}
